[Fix] CS-Rule: No external library in public API#4624
Conversation
…heck for public class for external Dependency check
…into CS-Rule-ExternalDependency
…into CS-Rule-ExternalDependency
...-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java
Show resolved
Hide resolved
|
Does this check handle a scenario such as |
vhvb1989
left a comment
There was a problem hiding this comment.
minor things , open to talk about it 👍
...-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java
Outdated
Show resolved
Hide resolved
...-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java
Outdated
Show resolved
Hide resolved
eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
Outdated
Show resolved
Hide resolved
…into CS-Rule-ExternalDependency
...-reports/src/main/java/com/azure/tools/checkstyle/checks/ExternalDependencyExposedCheck.java
Outdated
Show resolved
Hide resolved
Alan's point here is a good one. For example, ConfigurationClientCredentials has methods that take a |
JonathanGiles
left a comment
There was a problem hiding this comment.
Looks good to me, after taking into account the feedback from the other reviewers.
…into CS-Rule-ExternalDependency
|
Refactored the code and created a recursion method that takes care of (1) TYPE as a root node, it can have IDENT and/or TYPE_AURGUMENTS as children nodes; (2) TYPE_AURGUMENT as a root node, it can have IDENT and/or TYPE_AURGUMENTS as children nodes; (3) TYPE_AURGUMENTS as a root node, it can have TYPE_AURGUMENT as child node. |
A fix to No External Dependency check style rule. Previously, it fails only on the method's return type but not parameter types, and not checking on a protected class.
Also, remove unused import